﻿// ===============================================================================
// XCI.NET 西安交通信息WinForm开发框架 2018 版权所有
// ===============================================================================

using DevExpress.Data.Filtering;
using DevExpress.XtraEditors;
using DevExpress.XtraTreeList;
using XCI.Helper;
using XCI.Windows;

namespace XCI.Setting.Controls
{
    public partial class SettingTreeOptionsFind : BaseUserControl
    {
        private readonly TreeList treeList;
        public SettingTreeOptionsFind(TreeList treeList)
        {
            InitializeComponent();
            this.treeList = treeList;
            InitForm();
        }

        private void InitForm()
        {
            if (WinFormHelper.IsDesignMode()) return;

            WinFormHelper.AddEnum(typeof(FindPanelBehavior), editBehavior);
            WinFormHelper.AddEnum(typeof(FilterCondition), editCondition);
            WinFormHelper.AddEnum(typeof(FindPanelParserKind), editParserKind);
            WinFormHelper.AddEnum(typeof(FilterMode), editFilterMode);
            
            WinFormHelper.BindCustomPropertyControlValue(layoutControl1, treeList);
        }
    }
}
